package calorie.com.calorie.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lxh.baselibray.util.TimeUtils;

import java.text.SimpleDateFormat;
import java.util.List;

import calorie.com.calorie.R;
import calorie.com.calorie.response.AccelerateResponce;

public class AccelerateAdapter extends BaseQuickAdapter<AccelerateResponce.DataBean,BaseViewHolder> {
    public AccelerateAdapter(int layoutResId, @Nullable List<AccelerateResponce.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AccelerateResponce.DataBean item) {
        helper.setText(R.id.tv_multiple,item.getRemarks())
                .setText(R.id.tv_buy_time, TimeUtils.millis2String(item.getCreateTime(),new SimpleDateFormat("yyyy-MM-dd")))
                .setText(R.id.tv_banlanc_day,item.getSurplusDay());
    }
}
